package han.chensing.latos.maker.windows.widget;

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;
import han.chensing.latos.maker.function.AsString;

import java.util.List;

public class CScrollList<T> extends ScrollPane {

    CUIList<T> CUIList;

    public CScrollList(Skin skin, AsString<T> asString) {
        super(null,skin);
        CUIList =new CUIList<>(skin, asString);
        setActor(CUIList);
    }

    public void update(){
        CUIList.update();
        invalidateHierarchy();
    }

    public CUIList<T> getCList() {
        return CUIList;
    }

    public void setData(List<T> data){
        CUIList.setDataList(data);
    }
}
